Skip to content

Allow unevaluated properties to extend the configuration#514

Merged
Hmnt39 merged 1 commit intomasterfrom
chore/release
Mar 24, 2026
Merged

Allow unevaluated properties to extend the configuration#514
Hmnt39 merged 1 commit intomasterfrom
chore/release

Conversation

@Hmnt39
Copy link
Copy Markdown
Contributor

@Hmnt39 Hmnt39 commented Mar 23, 2026

This PR will allow unevaluated properties to extend the configuration. As "unevaluatedProperties": false extractor config is unable to extend.

@Hmnt39 Hmnt39 requested a review from a team as a code owner March 23, 2026 12:25
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the flexibility of the extractor configuration by modifying its JSON schema. By removing a specific constraint, the configuration can now be extended with additional properties, which was previously prevented. This change facilitates more adaptable and extensible configurations for the extractor.

Highlights

  • JSON Schema Configuration: Removed the "unevaluatedProperties": false constraint from the extractor_config.schema.json to allow for schema extension.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request proposes to allow extending the base extractor configuration by removing the "unevaluatedProperties": false constraint from the JSON schema. While this makes the configuration more flexible, it introduces a critical risk by disabling static validation for typos in property names. This could lead to misconfigurations that are only caught at runtime, potentially causing serious issues like data loss or incorrect processing. I have added a review comment detailing this concern and suggesting a safer alternative that maintains validation while still allowing for schema extension.

"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"description": "Base extractor configuration object",
"unevaluatedProperties": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Removing "unevaluatedProperties": false allows for extending the configuration, but it critically weakens static validation. This change means that typos in standard property names (e.g., state-stor instead of state-store) will no longer be detected by JSON schema validators in IDEs or CI pipelines.

While Pydantic's runtime validation will eventually catch such errors, the lack of static validation increases the risk of deploying misconfigured extractors. For example, a misspelled state-store configuration would cause the extractor to fall back to a default LocalStateStore, potentially leading to data reprocessing or loss of state, which is a critical correctness issue.

To maintain robust validation, I recommend keeping "unevaluatedProperties": false and documenting how users can extend the schema using allOf. This approach ensures that base properties are always validated correctly while still providing a clear path for extensibility.

Example for an extending schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "allOf": [
    { "$ref": "https://.../extractor_config.schema.json" }
  ],
  "properties": {
    "my-custom-property": { "type": "string" }
  }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this what we are currently doing? Why is this change necessary really?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unevaluatedProperties: false prevents extending the schema via allOf with additional properties.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.30%. Comparing base (c50988a) to head (1ab7982).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #514      +/-   ##
==========================================
+ Coverage   81.25%   81.30%   +0.04%     
==========================================
  Files          43       43              
  Lines        4210     4210              
==========================================
+ Hits         3421     3423       +2     
+ Misses        789      787       -2     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hmnt39 Hmnt39 requested a review from mathialo March 23, 2026 15:12
@Hmnt39 Hmnt39 added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Mar 24, 2026
@einarmo einarmo self-assigned this Mar 24, 2026
@einarmo einarmo added the risk-review-ongoing Risk review is in progress label Mar 24, 2026
@einarmo
Copy link
Copy Markdown
Contributor

einarmo commented Mar 24, 2026

🦄

@Hmnt39 Hmnt39 merged commit 9b7d129 into master Mar 24, 2026
7 checks passed
@Hmnt39 Hmnt39 deleted the chore/release branch March 24, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-risk-review Waiting for a member of the risk review team to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants